BitmapUtils (CreateJS) Class
[CreateJS only] Designed to provide utility related to Bitmaps.
Item Index
Methods
- loadSpriteSheet static
- replaceWithScaledBitmap static
Methods
loadSpriteSheet
(
static
-
frameDict
-
spritesheetImage
-
[scale=1]
Replaces Bitmaps in the global lib dictionary with a version that pulls the image from a spritesheet.
Parameters:
-
frameDict
ObjectA dictionary of frame information, with frame, trimmed, and spriteSourceSize properties (like the JSON hash output from TexturePacker).
-
spritesheetImage
Image | HTMLCanvasElementThe spritesheet image that contains all of the frames.
-
[scale=1]
Number optionalThe scale to apply to all sprites from the spritesheet. For example, a half sized spritesheet should have a scale of 2.
replaceWithScaledBitmap
(
static
-
idOrDict
-
[scale]
Replaces Bitmaps in the global lib dictionary with a version that uses a scaled bitmap, so you can load up smaller bitmaps behind the scenes that are scaled back up to normal size.